<?php
/**
 * @Author: Marte
 * @Date:   2017-08-11 14:57:17
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-18 22:17:58
 */
$_bookid=$_GET['id'];
$sql2="select bookname from books where bookid='$_bookid'";
//查找到对应bookid和章节的记录"select bookname from books where bookid='$_bookid'";
$_result4=$_mysql->query($sql2);
$_assoc4=$_result4->fetch_assoc();

//找评论
$sql3="select * from book_comment where bookid='$_bookid' order by id desc";
$_result5=$_mysql->query($sql3);
$num=0;
?>
<div class="title_1">
    <span class="pl_title">《<?php echo $_assoc4['bookname']?>》讨论区 </span>
</div>

<div class="change3">

    <!-- <span class="pl_title">《猎者天下》讨论区</span> -->
    <div class="pl_left">

    <ul>
    <?php

        while ($_assoc5=$_result5->fetch_assoc()) {
            $username=$_assoc5['send'];
            $_sql3="select nickname,headicon from userregisters where username='$username'";
            $_result6=$_mysql->query($_sql3);
            $_assoc6=$_result6->fetch_assoc();


    ?>
    <li>
            <div class="ul_left">
                    <i><img src="<?php echo $_assoc6['headicon']?>" alt=""></i>
            </div>

        <div class="ul_right">
            <span class="pl_author"><?php echo $_assoc6['nickname'];?> <em>发表了帖子</em></span>
            <span class="pl_centent ll">冒泡</span><span class="pl_centent qq"><?php echo $_assoc5['comment']?></span>
            <span  class="pl_back ww"><?php echo $_assoc5['time']?>发布</span><span class="pl_back ee"><em>0</em>  回复</span><span class="pl_back rr"><em>0</em>  点赞</span>
        </div>

        </li>
<?php
    }
?>


    </ul>

    </div>
    <div class="pl_right">
    <!-- <span class="qu_title">区主</span> -->
    <a class="pl_a" href="" name="message" title="<?php echo $_bookid; ?>">发帖子</a>

    </div>
</div>
